using System;
using QFramework;
using TodoPro.Utility;
using UnityEngine;

namespace TodoPro
{
    public interface ITodoCommand : ICommand
    {
    }

    public class TodoProConfig : AbstractArchitectureConfig<ITodoCommand,TodoProConfig>
    {
        /// <summary>
        /// 系统配置
        /// </summary>
        /// <param name="systemLayer"></param>
        protected override void OnSystemConfig(IQFrameworkContainer systemLayer)
        {
            
        }

        /// <summary>
        /// 模型配置
        /// </summary>
        /// <param name="modelLayer"></param>
        protected override void OnModelConfig(IQFrameworkContainer modelLayer)
        {
            Debug.Log("onModelConfig");
            modelLayer.RegisterInstance<ITodoModel>(new TodoModel());
        }

        /// <summary>
        /// 工具配置
        /// </summary>
        /// <param name="utilityLayer"></param>
        protected override void OnUtilityConfig(IQFrameworkContainer utilityLayer)
        {
            utilityLayer.RegisterInstance<IStorage>(new DefaultStorage());
            utilityLayer.RegisterInstance<IJsonSerializer>(new DefaultJsonSerializer());
        }
    }


    public class TodoEventSystemNode : TodoProConfig.AbstractEventSystemNode<TodoEventSystemNode>
    {
        [Obsolete("不允许自己 new 这个对象",true)]
        public TodoEventSystemNode() {}
    }
}